package com.netflix.service.shopping.controller;

import com.basic.pojo.good.ShoppingItem;
import com.google.common.collect.ImmutableList;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.math.BigDecimal;
import java.util.List;

@RequestMapping("/shopping")
@RestController
public class ShoppingController {

    @RequestMapping(value = "/items", method = RequestMethod.GET)
    public List<ShoppingItem> getAllItems() {
        return ImmutableList.of(new ShoppingItem(1L, "iPhone11", new BigDecimal("9800.56")));
    }
}
